﻿/**
 * Created by thomas on 2017/9/11.
 */
export default {
  get_my_exchange(state){
      return state.Exchange_mess
  },
  //选中的好友id
  Post_user_msg(state) {
      return state.Post_user_msg
  },
  get_post_mess(state) {
      let arr_for_id = [];
      //map值：key: fid(好友id) values: quantity(数量)
      //是数组的话 就循环
      let temp = {};
      let length = state.Post_user_msg.length;
      for (let x = 0; x < length; x++) {
          let index = state.Post_user_msg[x].index;
          console.log("ccccccccccccccccccccccc")
          console.log(state.Exchange_mess[index]);
          console.log(state.Exchange_mess[index].count)
          if (state.Exchange_mess[index].count == 0 || state.Exchange_mess[index].count == undefined) {
              console.log("count_+_+_+_+_++__+_")
              break;
          }
          
          temp = {};
          temp.count = state.Exchange_mess[index].count;//获取index 下的 点击
          temp.id = state.Post_user_msg[x].id//获取点击的 id
          arr_for_id.push(temp)
      }
      if (arr_for_id == undefined) {
          console.log("underfined_+__+++++++++++")
          arr_for_id = false;
      }
     
      return arr_for_id
  },
  get_youyuanren_mess(state) {
      console.log("Get_mess++++++++++++++++++++++")
      console.log(state.youyuanren_mess)
      return state.youyuanren_mess;
  },
  get_letter_man(state) {
      return state.letter_man
  },
  get_header_scroll_nav(state) {
      return state.header_scroll_nav;
  }
}
